<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>28_3D-开启3D空间和景深设置</title>
        <style>
            .outer {
                width: 200px;
                height: 200px;
                border: 1px solid black;

                /* 在父元素中开启3D空间 */
                transform-style: preserve-3d;

                /* 在父元素中 设置景深 */
                perspective: 100px;

            }

            .inner {
                width: 200px;
                height: 200px;
                background-color: aqua;

                transform: rotateX(45deg);
            }
        </style>
    </head>
    <body>
        <div class="outer">
            <div class="inner">

            </div>
        </div>
    </body>
</html>